package com.infolab.aims.domain.workorder;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.infolab.aims.common.bean.AbstractModelBean;
import com.infolab.aims.domain.asset.AssetModel;

@Entity
@Table(name="AMTB_WORKORDER_PART")
public class WorkOrderPart extends AbstractModelBean {
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer workOrderPartId;
	
	@ManyToOne
	@JoinColumn(name="workOrderId")
	private WorkOrder workOrder;
	
	@ManyToOne
	@JoinColumn(name="assetModelId")
	private AssetModel assetModel;
	
	private String oldSerialNo;
	
	private String newSerialNo;
	
	private String workOrderPartRemarks;
	
	@Transient
	private boolean deleted;

	public Integer getWorkOrderPartId() {
		return workOrderPartId;
	}

	public void setWorkOrderPartId(Integer workOrderPartId) {
		this.workOrderPartId = workOrderPartId;
	}

	public WorkOrder getWorkOrder() {
		return workOrder;
	}

	public void setWorkOrder(WorkOrder workOrder) {
		this.workOrder = workOrder;
	}

	public AssetModel getAssetModel() {
		return assetModel;
	}

	public void setAssetModel(AssetModel assetModel) {
		this.assetModel = assetModel;
	}

	public String getOldSerialNo() {
		return oldSerialNo;
	}

	public void setOldSerialNo(String oldSerialNo) {
		this.oldSerialNo = oldSerialNo;
	}

	public String getNewSerialNo() {
		return newSerialNo;
	}

	public void setNewSerialNo(String newSerialNo) {
		this.newSerialNo = newSerialNo;
	}

	public boolean isDeleted() {
		return deleted;
	}

	public void setDeleted(boolean deleted) {
		this.deleted = deleted;
	}

	public String getWorkOrderPartRemarks() {
		return workOrderPartRemarks;
	}

	public void setWorkOrderPartRemarks(String workOrderPartRemarks) {
		this.workOrderPartRemarks = workOrderPartRemarks;
	}
}
